<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg">
  <!-- 背景 -->
  <rect width="800" height="600" fill="#f8f9fa" stroke="none"/>
  
  <!-- 标题 -->
  <text x="400" y="30" text-anchor="middle" font-size="20" font-weight="bold" fill="#2c3e50">
    PrimaryCalendarRequest Builder模式执行流程
  </text>
  
  <!-- 步骤1: 调用builder() -->
  <rect x="50" y="80" width="200" height="80" fill="#3498db" stroke="#2980b9" stroke-width="2" rx="10"/>
  <text x="150" y="110" text-anchor="middle" font-size="12" fill="white" font-weight="bold">
    PrimaryCalendarRequest
  </text>
  <text x="150" y="130" text-anchor="middle" font-size="12" fill="white">
    .builder()
  </text>
  
  <!-- 箭头1 -->
  <path d="M 250 120 L 320 120" stroke="#e74c3c" stroke-width="3" fill="none" marker-end="url(#arrowhead)"/>
  <text x="285" y="110" text-anchor="middle" font-size="10" fill="#e74c3c">返回</text>
  
  <!-- 步骤2: Builder实例 -->
  <rect x="330" y="80" width="200" height="80" fill="#e67e22" stroke="#d35400" stroke-width="2" rx="10"/>
  <text x="430" y="105" text-anchor="middle" font-size="12" fill="white" font-weight="bold">
    PrimaryCalendarRequest
  </text>
  <text x="430" y="125" text-anchor="middle" font-size="12" fill="white" font-weight="bold">
    Builder实例
  </text>
  <text x="430" y="145" text-anchor="middle" font-size="10" fill="white">
    (构建器对象)
  </text>
  
  <!-- 箭头2 -->
  <path d="M 430 160 L 430 220" stroke="#e74c3c" stroke-width="3" fill="none" marker-end="url(#arrowhead)"/>
  <text x="470" y="190" font-size="10" fill="#e74c3c">链式调用</text>
  
  <!-- 步骤3: 设置参数 -->
  <rect x="330" y="230" width="200" height="80" fill="#9b59b6" stroke="#8e44ad" stroke-width="2" rx="10"/>
  <text x="430" y="255" text-anchor="middle" font-size="12" fill="white" font-weight="bold">
    .user_id_type("user_id")
  </text>
  <text x="430" y="275" text-anchor="middle" font-size="10" fill="white">
    设置参数并返回
  </text>
  <text x="430" y="295" text-anchor="middle" font-size="10" fill="white">
    Builder自身
  </text>
  
  <!-- 箭头3 -->
  <path d="M 430 310 L 430 370" stroke="#e74c3c" stroke-width="3" fill="none" marker-end="url(#arrowhead)"/>
  <text x="470" y="340" font-size="10" fill="#e74c3c">继续链式</text>
  
  <!-- 步骤4: 构建最终对象 -->
  <rect x="330" y="380" width="200" height="80" fill="#27ae60" stroke="#229954" stroke-width="2" rx="10"/>
  <text x="430" y="410" text-anchor="middle" font-size="12" fill="white" font-weight="bold">
    .build()
  </text>
  <text x="430" y="430" text-anchor="middle" font-size="10" fill="white">
    构建并返回
  </text>
  <text x="430" y="450" text-anchor="middle" font-size="10" fill="white">
    PrimaryCalendarRequest
  </text>
  
  <!-- 箭头4 -->
  <path d="M 530 420 L 600 420" stroke="#e74c3c" stroke-width="3" fill="none" marker-end="url(#arrowhead)"/>
  <text x="565" y="410" text-anchor="middle" font-size="10" fill="#e74c3c">最终返回</text>
  
  <!-- 步骤5: 最终结果 -->
  <rect x="610" y="380" width="150" height="80" fill="#2c3e50" stroke="#34495e" stroke-width="2" rx="10"/>
  <text x="685" y="405" text-anchor="middle" font-size="12" fill="white" font-weight="bold">
    request:
  </text>
  <text x="685" y="425" text-anchor="middle" font-size="12" fill="white" font-weight="bold">
    PrimaryCalendar
  </text>
  <text x="685" y="445" text-anchor="middle" font-size="12" fill="white" font-weight="bold">
    Request
  </text>
  
  <!-- 代码示例框 -->
  <rect x="50" y="500" width="700" height="80" fill="#ecf0f1" stroke="#bdc3c7" stroke-width="2" rx="5"/>
  <text x="60" y="520" font-size="12" fill="#2c3e50" font-weight="bold">代码执行:</text>
  <text x="60" y="540" font-size="11" fill="#e74c3c" font-family="monospace">
    request: PrimaryCalendarRequest = PrimaryCalendarRequest.builder()
  </text>
  <text x="60" y="555" font-size="11" fill="#e74c3c" font-family="monospace">
    &#160;&#160;&#160;&#160;.user_id_type("user_id").build()
  </text>
  
  <!-- 内部逻辑说明 -->
  <rect x="50" y="200" width="250" height="120" fill="#fff3cd" stroke="#ffc107" stroke-width="1" rx="5"/>
  <text x="60" y="220" font-size="12" fill="#856404" font-weight="bold">Builder内部逻辑:</text>
  <text x="60" y="240" font-size="10" fill="#856404">1. 创建PrimaryCalendarRequest实例</text>
  <text x="60" y="255" font-size="10" fill="#856404">2. 设置HTTP方法和URI</text>
  <text x="60" y="270" font-size="10" fill="#856404">3. 配置token类型</text>
  <text x="60" y="285" font-size="10" fill="#856404">4. 保存在_primary_calendar_request</text>
  <text x="60" y="300" font-size="10" fill="#856404">5. build()时返回配置好的实例</text>
  
  <!-- 箭头标记定义 -->
  <defs>
    <marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
      <polygon points="0 0, 10 3.5, 0 7" fill="#e74c3c"/>
    </marker>
  </defs>
</svg>